package com.guochu.org.entity;

import com.guochu.common.enums.ErrorEnum;
import com.guochu.common.infrastructure.IEntity;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * 用户管理表(User)实体类
 *
 * @author bunting.wei
 * @since 2020-12-11 15:36:19
 */
public class User extends IEntity implements Serializable {
    private static final long serialVersionUID = -32466286604502409L;
    /**
     * 用户姓名
     */
    private String userName;
    /**
     * 头像
     */
    private String headIcon;
    /**
     * 性别 1男 2女
     */
    private Integer gender;
    /**
     * 手机
     */
    private String mobile;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 微信
     */
    private String weChat;


    /**
     * 是否实名认证 1审核中 2已通过 3未通过
     */
    private Integer realName;
    /**
     * 身份证号码
     */
    private String iDNumber;
    /**
     * 身份证图片
     */
    private String iDNumberPicture;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getHeadIcon() {
        return headIcon;
    }

    public void setHeadIcon(String headIcon) {
        this.headIcon = headIcon;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWeChat() {
        return weChat;
    }

    public void setWeChat(String weChat) {
        this.weChat = weChat;
    }


    public Integer getRealName() {
        return realName;
    }

    public void setRealName(Integer realName) {
        this.realName = realName;
    }

    public String getiDNumber() {
        return iDNumber;
    }

    public void setiDNumber(String iDNumber) {
        this.iDNumber = iDNumber;
    }

    public String getiDNumberPicture() {
        return iDNumberPicture;
    }

    public void setiDNumberPicture(String iDNumberPicture) {
        this.iDNumberPicture = iDNumberPicture;
    }


    public ErrorEnum verify() {
        if (!StringUtils.isBlank(getUserName())) {
            return null;
        }
        if (!StringUtils.isBlank(getMobile())) {
            return null;
        }
        //异常提示
        return ErrorEnum.A_MUST_PARAMETER;
    }

}
